<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <div>
        <h3 style="color: red; font-size: 3rem; border: solid">
          this is class style
        </h3>
        <h3 :style="[s1,s2]">this is class style</h3>
        <button @click="set">set</button>
      </div>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          s1: { color: "red", border: "solid" },
          s2: { fontSize: "3rem", background: "yellow" },
        },
        methods: {
          set() {
            this.s1.color = "green";
          },
        },
      });
    </script>
  </body>
</html>
